Making maps with R

Alexandre Bevington, FNRORD

2020-06-02

Introduction

R is not a GIS like ArcMap or QGIS… it is generally harder to zoom around and check our your data. That said, there are a lot of advantages of using R for map making:

Today we will run through three examples:

  1. Basics: Very short intro!
  2. Example A: Average maximum SWE
  3. Example B: BEC units with a hillshade
  4. Example C: Satellite images

Goal:

Audience:


Basics


Step 1 - Load libraries

Step 2 - ggplot basics

Step 3 - Let’s make a map!


Example 1: Maximum Snow


Step 2 - Outline of BC

Step 3 - Where are the snow station stations?

Step 4 - Where are the data?

Step 5 - Calculate mean annual maximum SWE and plot

Step 6 - Calculate mean annual maximum SWE and plot

Step 7 - Optional - Mapview and Plotly


Example 2 - BEC and hillshade


Step 1 - Read data

Step 2 - Read BEC, calculate area, plot


Example 3 - Satellite Image


Sorry not enough time to develop new content! We will follow this tutorial:

https://github.com/bcgov/bcgov-r-geo-workshop/blob/master/20191106_Day_2_PM_Raster/03_Raster_Sentinel.Rmd

Outstanting topics

  1. Add scale bar and north arrow - see ggsn
  2. Add WMS basemap - see ggmap
  3. Save as: use ggsave()